<wx:page
 class="x-page"
 id="page"
 navigationBarTitleText="订单详情"
 style="font-size:12px;color:#666666"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps"
 xmlns:wxPayComp="$UI/comp/wxPay/components">
<wx:model
 id="model"
 style="left:0px;top:0px;height:auto;position:absolute">
<wx:wxApi
 id="wxapi"
 label="通用接口"/>
<wx:commonOperation
 id="commonOperation"
 label="操作扩展"
 xmlns:wx="$UI/wxsys/comps"/>
<wx:restData
 _created="true"
 auto="new"
 className="/main/dingdan"
 id="restData"
 label="订单"
 url="/dbrest"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<rule
 id="rule">
<col
 id="default0"
 name="fdingdanh"
 xid="xid_1549184200051_0">
<defaultValue
 id="default1">
<expr
 id="default2"><![CDATA[wx.RandomUtilFn.randomNumber(8)]]></expr></defaultValue></col>
<col
 id="default3"
 name="fxiadansj"
 xid="xid_1549184200052_1">
<defaultValue
 id="default4">
<expr
 id="default5"><![CDATA[wx.Date.now()]]></expr></defaultValue></col>
<col
 id="default6"
 name="fdingdanzt"
 xid="xid_1549184200053_2">
<defaultValue
 id="default7">
<expr
 id="default8"><![CDATA["待支付"]]></expr></defaultValue></col>
<col
 id="default9"
 name="fzongjine"
 xid="xid_1549184200054_3">
<calculate
 id="default10">
<expr
 id="default11"><![CDATA[restData1.sum("fjine")]]></expr></calculate></col>
<col
 id="default17"
 name="fyonghu">
<defaultValue
 id="default18">
<expr
 id="default19"><![CDATA[restData3.current.userName/*{"dependencies":["user"]}*/]]></expr></defaultValue></col>
<col
 id="default20"
 name="fzongshuol">
<calculate
 id="default21">
<expr
 id="default22"><![CDATA[restData1.sum("fshuoliang")]]></expr></calculate></col></rule></wx:restData>
<wx:restData
 _created="true"
 className="/main/dingdansp"
 id="restData1"
 label="订单商品"
 url="/dbrest"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<master
 data="restData"
 relation="dingdan"/>
<rule
 id="rule2">
<col
 id="default28"
 name="fjine">
<calculate
 id="default29">
<expr
 id="default30"><![CDATA[$row.fjiage * $row.fshuoliang]]></expr></calculate></col></rule></wx:restData>
<wx:restData
 _created="true"
 auto="load"
 className="/main/gouwuj"
 id="restData2"
 label="购物车"
 limit="-1"
 on:afterRefresh="{&quot;args&quot;:{&quot;event&quot;:&quot;js:$event&quot;},&quot;operation&quot;:&quot;restData2AfterRefreshCallback.customOperation&quot;,&quot;type&quot;:&quot;customOperation&quot;}"
 url="/dbrest"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:wx="$UI/wxsys/comps">
<join
 id="default36"
 leftTable="/main/gouwuj"
 rightTable="/main/shangpin1"
 xmlns="http://www.w3.org/1999/xhtml">
<on
 fn="eq"
 id="default37"
 leftField="fshangpinid"
 leftFieldLabel="商品id"
 rightField="fid"
 rightFieldLabel="主键"/>
<column
 field="fmingcheng"
 id="default38"
 label="商品id-名称"
 name="fshangpinid_shangpin1_fmingcheng"/>
<column
 field="ftupian"
 id="default39"
 label="商品id-图片"
 name="fshangpinid_shangpin1_ftupian"/>
<column
 field="fjiage"
 id="default40"
 label="商品id-价格"
 name="fshangpinid_shangpin1_fjiage"/></join>
<filter
 _filter_label="用户 等于 用户信息.登录名"
 id="restDatafilter2"
 name="_system1_">eq('fyonghu',restData3.current.userName/*{&quot;dependencies&quot;:[&quot;user&quot;]}*/)</filter>
<filter
 _filter_label="并且 选中 等于 1"
 id="restDatafilter3"
 name="_system2_">eq('fxuanzhong',1)</filter></wx:restData></wx:model>
<wx:loading
 class="weui-loader-full {{$state.loadingNum &lt;= 0 ?'weui-loader-hide':''}}"
 style="z-index: 10001;"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="ball-scale-ripple-multiple">
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/></view></wx:loading>
<wx:inVisibleCompContainer
 id="inVisibleCompContainer">
<wx:user
 appPath="$UI/main"
 autoLoadUserInfo="true"
 autoLogin="true"
 id="user"
 useOpenid="false">
<wx:restData
 _created="true"
 className="uaa/user"
 columns="id,name,email,userName,phone,avatarUrl,description,data4,data5,data9,data15,data17,data2,data3,data6"
 id="restData3"
 label="用户信息"
 owner="user"
 xmlns:wx="$UI/wxsys/comps">
<column
 id="default12"
 label="昵称"
 name="nickName"
 type="String"/>
<column
 id="default13"
 label="群组"
 name="group"
 type="Array"/>
<column
 id="default14"
 label="是否登录"
 name="isLogined"
 type="Boolean"/>
<rule
 id="rule1">
<readonly
 id="default15">
<expr
 id="default16">true</expr></readonly></rule></wx:restData></wx:user>
<wx:code
 _autogena="1"
 class=" x-inline-code"
 id="restData2AfterRefreshCallback"
 params="[{&quot;label&quot;:&quot;事件对象&quot;,&quot;type&quot;:&quot;$UI/wxsys/comps/restData/restData#afterRefresh&quot;,&quot;value&quot;:&quot;event&quot;,&quot;displayName&quot;:&quot;事件对象&quot;,&quot;name&quot;:&quot;event&quot;}]"
 type-label-info="{&quot;$UI/wxsys/comps/restData/restData#afterRefresh&quot;:&quot;刷新后事件&quot;}"
 xid="restData2AfterRefreshCallback"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<script
 id="script"
 type="code/model"><![CDATA[
<root><imports><import  id="import_iterator_iterator" from="iterator" name="iterator">$UI/wxsys/comps/tableData/iterator</import></imports><function  id="function1" name="code"><params  id="params1"><param  id="event" type="$UI/wxsys/comps/restData/restData#afterRefresh" label="事件对象">event</param></params><method  id="method1"><start  id="start1" label="开始"/><line  id="start1|loopActivity1" label="" from="start1" to="loopActivity1"/><loop  id="loopActivity1" label="循环变量1" items="this.comp(&quot;restData2&quot;)" type="wx:restData#Iterator" item="_item_loopActivity1"><invoke  id="invokeActivity1" label="新增数据1" async="false" type="COMPONENT" error="none"><value>{"target":"restData1","path":"$UI/wxsys/comps/restData/restData","name":"newData"}</value><output  declare="false" type="JSON"></output><args><arg  id="C851B4BFEE200001E2D8F5E312701580" name="options" type="JSON" label="新增参数">{"value":"{\"defaultValues\":[{\"fshangpinid\":_item_loopActivity1.row.fshangpinid,\"fshangpinmc\":_item_loopActivity1.row.fshangpinid_shangpin1_fmingcheng,\"ftupian\":_item_loopActivity1.row.fshangpinid_shangpin1_ftupian,\"fjiage\":_item_loopActivity1.row.fshangpinid_shangpin1_fjiage,\"fshuoliang\":_item_loopActivity1.row.fshuoliang,\"fjine\":_item_loopActivity1.row.fshangpinid_shangpin1_fjiage}]}","label":"{\"defaultValues\":[{\"fshangpinid\":_item_loopActivity1.row.fshangpinid,\"fshangpinmc\":_item_loopActivity1.row.fshangpinid_shangpin1_fmingcheng,\"ftupian\":_item_loopActivity1.row.fshangpinid_shangpin1_ftupian,\"fjiage\":_item_loopActivity1.row.fshangpinid_shangpin1_fjiage,\"fshuoliang\":_item_loopActivity1.row.fshuoliang,\"fjine\":_item_loopActivity1.row.fshangpinid_shangpin1_fjiage}]}"}</arg></args></invoke></loop><line  id="loopActivity1|end1" label="" from="loopActivity1" to="end1"/><end  id="end1" label="" error="none" type="void"/></method></function></root>]]></script>
<script
 id="script1"
 type="code/diagram"><![CDATA[{"version":"2","shapeStyle":{"start1":{"shape":{"x":50,"y":200,"w":20,"h":20},"pid":"method1","issel":"","iconurl":"","LABEL":"new"},"event":{"shape":{"x":80,"y":10,"w":30,"h":20},"pid":"params1","issel":"","iconurl":"","LABEL":"new"},"loopActivity1":{"shape":{"x":122,"y":135,"w":300,"h":150},"pid":"method1","issel":"","iconurl":"","LABEL":"1"},"invokeActivity1":{"shape":{"x":281,"y":180,"w":120,"h":60},"pid":"loopActivity1","issel":"","iconurl":"","LABEL":"1"},"start1|loopActivity1":{"LABEL":"1","issel":"","outPortDir":"e","inPortDir":"w","targetNode":"loopActivity1","sourceNode":"start1","shape":[{"x":69,"y":210},{"x":121,"y":210}]},"end1":{"shape":{"x":447,"y":200,"w":20,"h":20},"pid":"method1","issel":true,"iconurl":"","LABEL":"Refresh"},"loopActivity1|end1":{"LABEL":"","issel":"","outPortDir":"e","inPortDir":"w","targetNode":"end1","sourceNode":"loopActivity1","shape":[{"x":421,"y":210},{"x":446,"y":210}]}},"processFile":""}]]></script></wx:code>
<wx:address
 id="address"
 on:success="{&quot;operation&quot;:&quot;commonOperation.filedValues&quot;,&quot;args&quot;:{&quot;data&quot;:&quot;restData&quot;,&quot;values&quot;:&quot;js:[{\&quot;filed\&quot;:\&quot;fshouhuor\&quot;,\&quot;value\&quot;:$event.data.userName},{\&quot;filed\&quot;:\&quot;fshouhuodz\&quot;,\&quot;value\&quot;:$event.data.provinceName + $event.data.cityName + $event.data.countyName + $event.data.detailInfo},{\&quot;filed\&quot;:\&quot;flianjidh\&quot;,\&quot;value\&quot;:$event.data.telNumber}]&quot;}}"/>
<wxPayComp:wxPay
 appPath="$UI/main"
 id="wxPay"
 on:payFail="{&quot;operation&quot;:&quot;wxapi.showToast&quot;,&quot;args&quot;:{&quot;title&quot;:&quot;js:\&quot;支付失败\&quot;&quot;}}"
 on:paySuccess="[{&quot;operation&quot;:&quot;wxapi.showToast&quot;,&quot;args&quot;:{&quot;title&quot;:&quot;js:\&quot;支付成功\&quot;&quot;}},{&quot;operation&quot;:&quot;commonOperation.filedValues&quot;,&quot;args&quot;:{&quot;data&quot;:&quot;restData&quot;,&quot;values&quot;:&quot;js:[{\&quot;filed\&quot;:\&quot;fdingdanzt\&quot;,\&quot;value\&quot;:\&quot;待发货\&quot;},{\&quot;filed\&quot;:\&quot;fzhifusj\&quot;,\&quot;value\&quot;:wx.Date.now()}]&quot;}},{&quot;operation&quot;:&quot;commonOperation.saveData&quot;,&quot;args&quot;:{&quot;data&quot;:&quot;restData&quot;}},{&quot;operation&quot;:&quot;wxapi.redirectTo&quot;,&quot;args&quot;:{&quot;url&quot;:&quot;$UI/main/zhifu_cg.w&quot;}}]"
 outTradeno="restData.current.fdingdanh"
 productName="restData1.current.fshangpinmc"
 shopName="&quot;鱼香瓜瓢二手交易平台&quot;"
 totalFee="restData.current.fzongjine"/></wx:inVisibleCompContainer>
<wx:panel
 class="x-panel x-full"
 id="panel">
<wx:content
 class="x-panel-content"
 id="content"
 style="top:0px;bottom:48px;background-color:#F3F3F3">
<wx:row
 class="x-row"
 id="row1"
 on:tap="{&quot;operation&quot;:&quot;address.chooseAddress&quot;}"
 style="background-color:#FFFFFF;margin-bottom:8px">
<wx:col
 class="x-col x-col-center x-col-10"
 id="col3">
<wx:icon
 class="dataControl dataControl-label1"
 id="icon"
 size="15"
 style="font-size:24px"/></wx:col>
<wx:col
 class="x-col x-col-center"
 id="col4">
<wx:text
 bind:hidden="wx.Util.iif(restData.current.fshouhuor==&quot;&quot;,false,true)"
 id="text"
 style="display:block;padding-top:10px;padding-bottom:10px">请先添加收货地址</wx:text>
<view
 bind:hidden="wx.Util.iif(restData.current.fshouhuor!=&quot;&quot;,false,true)"
 id="view">
<wx:row
 class="x-row"
 id="row4">
<wx:col
 class="x-col"
 id="col13">
<wx:text
 bind:text="&quot;收货人：&quot; + restData.current.fshouhuor"
 id="text1">收货人姓名</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col15">
<wx:text
 bind:text="restData.current.flianjidh"
 id="text2">联系电话</wx:text></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row2"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<wx:col
 class="x-col"
 id="col6">
<wx:text
 bind:text="&quot;收货地址：&quot; + restData.current.fshouhuodz"
 id="text3">收货地址</wx:text></wx:col></wx:row></view></wx:col>
<wx:col
 class="x-col x-col-center x-col-10"
 id="col5">
<wx:icon
 class="linear linear-chevronright"
 id="icon1"
 size="15"/></wx:col></wx:row>
<view
 id="view1"
 style="background-color:#FFFFFF;margin-bottom:8px">
<wx:row
 class="x-row x-row-center"
 id="row7">
<wx:col
 class="x-col x-col-fixed x-col-center"
 id="col22">
<wx:icon
 class="icon-android-note"
 id="icon2"
 size="15"/></wx:col>
<wx:col
 class="x-col x-col-center"
 id="col24">
<wx:text
 id="text4">购物清单</wx:text></wx:col></wx:row>
<wx:listView
 id="listView">
<wx:list
 _created="true"
 id="list1"
 index="list1index"
 item="list1item"
 items="restData1.value"
 label="动态列表1"
 mockDataLimit="0"
 style="border-bottom:1px solid #F3F3F3;margin-left:5px">
<wx:row
 class="x-row x-row-center"
 id="row8"
 style="margin-bottom:4px">
<wx:col
 class="x-col x-col-fixed"
 id="col25">
<wx:image
 bind:src="list1item.ftupian"
 class="weui-img"
 id="image"
 mode="aspectFill"
 style="width:60px;height:60px"/></wx:col>
<wx:col
 class="x-col"
 id="col26">
<wx:text
 bind:text="list1item.fshangpinmc"
 id="text5">商品名称</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col27">
<wx:text
 bind:text="&quot;￥&quot; + list1item.fjiage"
 id="text6">单价</wx:text>
<wx:text
 bind:text="&quot;X &quot; + list1item.fshuoliang"
 id="text7"
 style="display:block;margin-top:10px">数量</wx:text></wx:col></wx:row></wx:list></wx:listView></view>
<view
 id="view6"
 style="background-color:#FFFFFF;margin-bottom:8px">
<wx:row
 class="x-row x-row-center"
 id="row10"
 style="padding-top:5px;padding-bottom:5px;border-bottom:1px solid #000">
<wx:col
 class="x-col x-col-fixed"
 id="col31">
<wx:text
 id="text8">买家留言：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col33">
<wx:input
 bind:ref="restData.current.fmaijialy"
 id="input"
 placeholder="输入留言"/></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row9"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<wx:col
 class="x-col"
 id="col28"
 style="text-align:right;font-size:14px;padding-top:10px;padding-bottom:10px">
<wx:text
 bind:text="&quot;共&quot; + restData.current.fzongshuol + &quot;件商品 合计：&quot;"
 id="text9">总数</wx:text>
<wx:text
 bind:text="&quot;￥&quot; + restData.current.fzongjine"
 id="text10"
 style="color:#fa6868"/></wx:col></wx:row></view></wx:content>
<wx:bottom
 class="x-panel-bottom"
 height="48"
 id="bottom"
 style="background-color:#FFFFFF;height:48px">
<wx:row
 class="x-row"
 id="row"
 style="height:48px;border-width:1px;border-top:1px solid #e1e1e1">
<wx:col
 class="x-col"
 id="col">
<wx:text
 id="text11"
 style="font-size:14px">实付:</wx:text>
<wx:text
 bind:text="&quot;￥&quot; + restData.current.fzongjine"
 id="text12"
 style="color:#fa6868;font-size:16px"/></wx:col></wx:row></wx:bottom></wx:panel></wx:page>___js___:import PageImpl from "$UI/wxsys/lib/base/pageImpl";var app = getApp();export default class IndexPage extends PageImpl {constructor(...args){super(...args);}

	
  restData2AfterRefreshCallback(event){
        let regeneratorRuntime = require('$UI/wxsys/comps/code/generator/runtime-module');
        'use strict';

        //当前函数的代码为自动生成,请勿手动修改!!!

        var iterator = require('$UI/wxsys/comps/tableData/iterator').default;

        function code(event) {
            var _iteratorNormalCompletion = true;
            var _didIteratorError = false;
            var _iteratorError = undefined;

            try {
                for (var _iterator = this.comp("restData2")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                    var _item_loopActivity1 = _step.value;

                    this.comp('restData1').newData({
                        "defaultValues": [{
                            "fshangpinid": _item_loopActivity1.row.fshangpinid,
                            "fshangpinmc": _item_loopActivity1.row.fshangpinid_shangpin1_fmingcheng,
                            "ftupian": _item_loopActivity1.row.fshangpinid_shangpin1_ftupian,
                            "fjiage": _item_loopActivity1.row.fshangpinid_shangpin1_fjiage,
                            "fshuoliang": _item_loopActivity1.row.fshuoliang,
                            "fjine": _item_loopActivity1.row.fshangpinid_shangpin1_fjiage
                        }]
                    });
                }
            } catch (err) {
                _didIteratorError = true;
                _iteratorError = err;
            } finally {
                try {
                    if (!_iteratorNormalCompletion && _iterator.return) {
                        _iterator.return();
                    }
                } finally {
                    if (_didIteratorError) {
                        throw _iteratorError;
                    }
                }
            }

            return;
        }
        return code.apply(this, arguments);
    }



	}